package com.cn.qtms.feign;//类注释设置模板

import com.cn.qtms.feign.error.KeepErrMsgConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.Map;

/**
 * @Name:AuthService
 * @Description:
 * @Author: zhangyang
 * @Date 2019-09-24 19:53
 **/
@FeignClient(value = "qtms-auth",configuration={KeepErrMsgConfiguration.class})
public interface AuthService {

    /**
     * 获取token获取用户信息
     * @return
     */
    @RequestMapping(value = "/info", method = RequestMethod.GET)
    public Map<String,Object> info();

    /**
     * 校验token是否存在 需要将token去掉token_type
     * @param token
     * @return
     */
    @RequestMapping(value = "/oauth/check_token", method = RequestMethod.GET)
    public Map<String,Object> checkToken(@RequestParam("token") String token);
}
